home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
DISKUTIL
/
MBOOT
/
!MakeBoot
/
Source
(
.txt
)
< prev
Wrap
RISC OS BBC BASIC V Source
|
1993-05-15
|
25KB
|
1,104 lines
><MakeBoot$Dir>.Source
This application is FreeWare. (c) 1993 Dick Alstein
error
quit%=
)mask%=1+(1<<4)+(1<<5)+(1<<11)+(1<<12)
"Wimp_Poll",mask%,blk%
reason%
reason%
2 :
"Wimp_OpenWindow",,blk%
blk%!0
!
winhdl%(0),winhdl%(1)
.
"Wimp_GetPointerInfo",,ptrinfo%
ptrinfo%!8=1
)
"Filer_OpenDir "+bootdir$
-1)
)
"Wimp_CloseWindow",,blk%
'
"Wimp_CloseWindow",,blk%
6 :
mouseclick(blk%!0,blk%!4,blk%!8,blk%!12,blk%!16)
7 :
moveappl
8 :
key(blk%!0,blk%!4,blk%!24)
9 :
menuselect(blk%)
17,18 :
receive(blk%!4,blk%!8,blk%!16)
quit%
"Wimp_CloseDown"
buf%,w%,i%
Appl$="MakeBoot"
Version$="1.11 (15-05-93)"
errblk% &100
"Wimp_Initialise",200,&4B534154,Appl$
osversion%,thistask%
error :
blk% &600
indsize%=&600
indir% indsize%
indirend%=indir%+indsize%
ptrinfo% 20
dragblk% 60
scrapblk% 256
"OS_ReadVarVal","MakeBoot$Dir",scrapblk%,256,0
,,len%
scrapblk%?len%=13
ApplDir$=$(scrapblk%)
ApplPath$="MakeBootRes:"
scrapblk%!0=-1
6!scrapblk%!4=0 : scrapblk%!8=0
7%scrapblk%!12=82 : scrapblk%!16=68
scrapblk%!20=&7000301A
$(scrapblk%+24)="!makeboot"
"Wimp_CreateIcon",,scrapblk%
baricon%
winhdl%(1)
wintitle%(1)
maxapps%=64
"Wimp_OpenTemplate",,ApplPath$+"Templates"
?"infowin%=
loadtemplate("Info")
@!$(blk%!(92+3*32+20))=Version$
A'winhdl%(0)=
loadtemplate("BootSeq")
wintitle%(0)=blk%!76
icon0xmin%=blk%!(92+0*32+0)
icon0xmax%=blk%!(92+0*32+8)
icon0ymin%=blk%!(92+0*32+4)
icon1xmin%=blk%!(92+1*32+0)
icon1xmax%=blk%!(92+1*32+8)
H+winhdl%(1)=
loadtemplate("DeskBootSeq")
wintitle%(1)=blk%!76
J#filewin%=
loadtemplate("Files")
fname%(1)
fname%(0)=blk%!(92+2*32+20)
fname%(1)=blk%!(92+3*32+20)
N(dialogwin%=
loadtemplate("Dialogue")
dial_msg%=blk%!(92+20)
P<dial_buttoncol%=(blk%!(92+1*32+16))
((1<<2)+(&FF<<24))
"Wimp_CloseTemplate"
msg_init
nractions%=5
action$(nractions%+1)
action$(0)="Run"
action$(1)="Boot"
action$(2)="IconSprites"
action$(3)="Filer_OpenDir"
action$(4)="ToolSprites"
action$(5)="Filer_Boot"
Action$(nractions%+1)
i%=0
nractions%
]& Action$(i%)=
upcase(action$(i%))
nrapps%(1)
nrapps%(0)=-1
nrapps%(1)=-1
applname$(1,maxapps%)
appltype%(1,maxapps%)
applsprite%(1,maxapps%)
appltext%(1,maxapps%)
applaction%(1,maxapps%)
applactiontxt%(1,maxapps%)
applargs%(1,maxapps%)
w%=0
i%=0
maxapps%
buf% 16
appltext%(w%,i%)=buf%
buf% 12
applsprite%(w%,i%)=buf%
buf% 16
p" applactiontxt%(w%,i%)=buf%
buf% 64
$(buf%)=""
applargs%(w%,i%)=buf%
initmenus
readscreenvars
changed%(1)
changed%(0)=
changed%(1)=
{*bootdir$=
striproot(ApplDir$)+".!Boot"
seqfname$(1)
seqfname$(0)="!Run"
seqfname$(1)="DeskBoot"
loadall
addappl(w%,name$,type%,action%,args$,nr%)
nrapps%(w%)=maxapps%
dialogue(0)
addicons(w%)
(nr%<=nrapps%(w%))
(nrapps%(w%)>=0)
#
I%=nrapps%(w%)
nr%
- applname$(w%,I%+1)=applname$(w%,I%)
- appltype%(w%,I%+1)=appltype%(w%,I%)
1 applaction%(w%,I%+1)=applaction%(w%,I%)
- applargs%(w%,I%+1)=applargs%(w%,I%)
updateline(w%,I%+1)
applname$(w%,nr%)=name$
appltype%(w%,nr%)=type%
action%=-1
+
attach default action to new item
type%
)
&1000 : applaction%(w%,nr%)=3
&2000
+
fileexists(name$+".!Boot")
# applaction%(w%,nr%)=1
0
fileexists(name$+".!Sprites")
% applaction%(w%,nr%)=1
% applaction%(w%,nr%)=0
)
&FF9 : applaction%(w%,nr%)=2
$
: applaction%(w%,nr%)=0
# applaction%(w%,nr%)=action%
$(applargs%(w%,nr%))=args$
updateline(w%,nr%)
nrapps%(w%)+=1
setchanged(w%,
addicons(w%)
linenr%,at%,as%,aa%
linenr%=nrapps%(w%)+1
scrapblk%!0=winhdl%(w%)
scrapblk%!4=icon0xmin%+12
scrapblk%!12=icon0xmax%
(scrapblk%!16=icon0ymin%-(80*linenr%)
!scrapblk%!8=(scrapblk%!16)-80
scrapblk%!20=&17006133
at%=appltext%(w%,linenr%)
$(at%)=""
scrapblk%!24=at%
as%=applsprite%(w%,linenr%)
$(as%)="S"
scrapblk%!28=as%
scrapblk%!32=16
"Wimp_CreateIcon",,scrapblk%
"aa%=applactiontxt%(w%,linenr%)
scrapblk%!4=icon1xmin%
scrapblk%!12=icon1xmax%
scrapblk%!20=&1B003131
$(aa%)=""
scrapblk%!24=aa%
scrapblk%!28=-1
scrapblk%!32=16
"Wimp_CreateIcon",,scrapblk%
setextent(w%,linenr%)
clearsequence(w%)
nrapps%(w%)>=0
deleteicons(w%)
nrapps%(w%)-=1
deleteappl(w%,nr%)
I%=nr%
(nrapps%(w%)-1)
) applname$(w%,I%)=applname$(w%,I%+1)
) appltype%(w%,I%)=appltype%(w%,I%+1)
- applaction%(w%,I%)=applaction%(w%,I%+1)
) applargs%(w%,I%)=applargs%(w%,I%+1)
updateline(w%,I%)
deleteicons(w%)
nrapps%(w%)-=1
setchanged(w%,
deleteicons(w%)
linenr%
linenr%=nrapps%(w%)
applname$(w%,linenr%)=""
updateline(w%,linenr%)
scrapblk%!0=winhdl%(w%)
scrapblk%!4=2*linenr%+2
"Wimp_DeleteIcon",,scrapblk%
scrapblk%!4=2*linenr%+3
"Wimp_DeleteIcon",,scrapblk%
setextent(w%,linenr%-1)
dirname(F$)
p%,q%
F$,".",p%)
q% > 0
p%=q%+1
q%=0
F$,p%-2)
errbox(err$,boxes%)
errblk%!0=0
$(errblk%+4)=err$+
"Wimp_ReportError",errblk%,boxes%,Appl$
,click%
=(click%=1)
error
"Wimp_CloseDown" :
errbox(
$+" (line "+
)+")",3)
"Wimp_CloseDown"
direxists(f$)
type%,flags%
type%=0
(f$)>0
"XOS_File",17,f$
type%;flags%
=(type%=2)
((flags%
1)=0)
fileexists(f$)
type%,flags%
type%=0
(f$)>0
"XOS_File",17,f$
type%;flags%
=(type%=1)
((flags%
1)=0)
seqfname(i%)
=bootdir$+"."+seqfname$(i%)
key(window%,icon%,key%)
window%
filewin%
!
(icon%=3)
(key%=13)
bootdir$=$(fname%(0))
# seqfname$(1)=$(fname%(1))
#
selecticon(filewin%,4,1)
"
"Wimp_CreateMenu",,-1
#
selecticon(filewin%,4,0)
!#
"Wimp_ProcessKey",key%
"
$!
"Wimp_ProcessKey",key%
leafname(f$)
p%,q%
p%=q%+1
q%=
f$,".",p%)
q%=0
f$,p%)
--- split name of root directory from pathname ---
striproot(f$)
p%,q%
f$,"$")
q%>0
p%=q%
q%=
f$,"$",p%+1)
f$,p%)
loadall
i%,loaderror%
loaderror%=0
"Hourglass_On"
direxists(bootdir$)
i%=0
B&
fileexists(
seqfname(i%))
loadsequence(i%)
D
E*
loaderror%=0
loaderror%=1+i%
F
loaderror%=4
"Hourglass_Off"
loaderror%
1 :
dialogue(1)
2 :
dialogue(2)
3 :
dialogue(3)
4 :
dialogue(4)
loadsequence(w%)
p%,in$,cmd$,file$,arg$,act%,tagfound%
tagfound%=
seqfname(w%))
F%<>0
#F% :
error :
in$=
p%=
in$,"|")
p%>0
tagfound%
_' tagfound%=(
in$,Appl$,p%)<>0)
`
in$=
in$,p%-1)
p%=
in$," ")
d) cmd$=
upcase(
trimleft(
in$,p%-1)))
in$=
trimleft(
in$,p%+1))
p%=
in$," ")
file$=
in$,p%-1)
h arg$=
trimleft(
in$,p%+1))
cmd$,1)="*"
j9 cmd$=
cmd$,2) :
strip leading "*"s from command
cmd$,1)="%"
m8 cmd$=
cmd$,2) :
strip leading "%" from command
(cmd$<>"")
(file$<>"")
act%=0
q5
(act%<=nractions%)
(cmd$<>Action$(act%))
act%+=1
s
(act%<=nractions%)
act%
w3
upcase(
leafname(file$))="!BOOT"
act%=1
y% file$=
dirname(file$)
|:
upcase(
leafname(file$)),8)="!SPRITES"
}6
leafname(
dirname(file$)),1)="!"
act%=1
' file$=
dirname(file$)
D
addappl(w%,file$,
objtype(file$),act%,arg$,nrapps%(w%)+1)
9
(cmd$="DESKTOP")
(file$="-File")
(w%=0)
( seqfname$(1)=
leafname(arg$)
tagfound%)
(loaderror%=0)
loaderror%=3
setchanged(w%,
loadtemplate(name$)
handle%
"Wimp_CloseTemplate" :
error
"Wimp_LoadTemplate",,blk%+4,indir%,indirend%,-1,name$,0
,,indir%
"Wimp_CreateWindow",,blk%+4
handle%
=handle%
mouseclick(xpos%,ypos%,button%,wndw%,icon%)
wndw%
(button%
"
closewindow(winhdl%(0))
"
closewindow(winhdl%(1))
(button%
!
openwindow(winhdl%(0))
!
openwindow(winhdl%(1))
(button%
)
showmenu(blk%,mainmenu%,-1,-1)
winhdl%(0),winhdl%(1)
wndw%=winhdl%(0)
w%=0
w%=1
linenr%=(icon%-2)
8
(button%
((icon%
2)=1)
(icon%>=2)
(button%=1)
+
applaction%(w%,linenr%)=0
2 applaction%(w%,linenr%)=nractions%
* applaction%(w%,linenr%)-=1
L
validaction(applaction%(w%,linenr%),w%,appltype%(w%,linenr%))
4
applaction%(w%,linenr%)=nractions%
) applaction%(w%,linenr%)=0
* applaction%(w%,linenr%)+=1
L
validaction(applaction%(w%,linenr%),w%,appltype%(w%,linenr%))
!
updateline(w%,linenr%)
setchanged(w%,
(button%
icon%>=2
/
showmenu(blk%,seqmenu%,w%,linenr%)
*
showmenu(blk%,seqmenu%,w%,-1)
3
(button%
16)
(linenr%<=nrapps%(w%))
startdrag(w%,linenr%)
filewin%
icon%
! bootdir$=$(fname%(0))
% seqfname$(1)=$(fname%(1))
$
"Wimp_CreateMenu",,-1
dialogwin%
lastdialogue%
icon%=1
quit%=
"Wimp_CreateMenu",,-1
openwindow(handle%)
scrapblk%!0=handle%
"Wimp_GetWindowState",,scrapblk%
scrapblk%!28=-1
"Wimp_OpenWindow",,scrapblk%
closewindow(handle%)
scrapblk%!0=handle%
"Wimp_CloseWindow",,scrapblk%
moveappl
w%,linenr%,an$,at%,aa%,ar$,ar%
"Wimp_GetPointerInfo",,ptrinfo%
w%=-1
ptrinfo%!12=winhdl%(0)
w%=0
ptrinfo%!12=winhdl%(1)
w%=1
w%<>-1
ptrinfo%!16
w%=dragfromwin%
linenr%=nrapps%(w%)
! linenr%=nrapps%(w%)+1
linenr%=0
& linenr%=(ptrinfo%!16 - 2)
/ an$=applname$(dragfromwin%,dragfromline%)
/ at%=appltype%(dragfromwin%,dragfromline%)
1 aa%=applaction%(dragfromwin%,dragfromline%)
/ ar%=applargs%(dragfromwin%,dragfromline%)
2 ar$=$(applargs%(dragfromwin%,dragfromline%))
w%=dragfromwin%
!
dragfromline%>linenr%
move down
/
I%=(dragfromline%-1)
linenr%
/ applname$(w%,I%+1)=applname$(w%,I%)
/ appltype%(w%,I%+1)=appltype%(w%,I%)
3 applaction%(w%,I%+1)=applaction%(w%,I%)
/ applargs%(w%,I%+1)=applargs%(w%,I%)
updateline(w%,I%+1)
!
dragfromline%<linenr%
move up
*
I%=dragfromline%
(linenr%-1)
/ applname$(w%,I%)=applname$(w%,I%+1)
/ appltype%(w%,I%)=appltype%(w%,I%+1)
3 applaction%(w%,I%)=applaction%(w%,I%+1)
/ applargs%(w%,I%)=applargs%(w%,I%+1)
updateline(w%,I%)
! applname$(w%,linenr%)=an$
! appltype%(w%,linenr%)=at%
# applaction%(w%,linenr%)=aa%
! applargs%(w%,linenr%)=ar%
updateline(w%,linenr%)
$
(dragfromline%<>linenr%)
setchanged(w%,
move to other window
"
nrapps%(w%)<maxapps%
#.
addappl(w%,an$,at%,aa%,ar$,linenr%)
$1
deleteappl(dragfromwin%,dragfromline%)
%
readscreenvars
xeig%,yeig%,xpixels%,ypixels%
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
"OS_ReadModeVariable",-1,11
,,xpixels%
"OS_ReadModeVariable",-1,12
,,ypixels%
0Escreensize_x%=(xpixels%+1)*(1<<xeig%) :
screen size in OS units
1)screensize_y%=(ypixels%+1)*(1<<yeig%)
receive(sender%,ref%,code%)
w%,ack%,file$,type%
ack%=
sender% <> thistask%
code%
quit%=
ack%=
file$=
str(blk%+44)
type%=blk%!40
blk%!20
@#
winhdl%(0),winhdl%(1)
A&
(blk%!20=winhdl%(0))
w%=0
w%=1
(blk%!24=-1)
G% linenr%=nrapps%(w%)+1
I' linenr%=(blk%!24 - 2)
J'
linenr%<0
linenr%=0
L4
addappl(w%,file$,type%,-1,"",linenr%)
ack%=
O2
(blk%!24=baricon%)
(type%=&2000)
P0
upcase(
file$,7))="$.!BOOT"
Q bootdir$=file$
R#
clearsequence(0)
S#
clearsequence(1)
loadall
&400C0
$(fname%(0))=bootdir$
Z# $(fname%(1))=seqfname$(1)
[:
"Wimp_CreateSubMenu",,blk%!20,blk%!24,blk%!28
&400C1
readscreenvars
ack%
blk%!0=20
blk%!12=ref%
blk%!16=4
c-
"Wimp_SendMessage",17,blk%,sender%
saveall
savesequence(0)
savesequence(1)
savesequence(w%)
(nrapps%(w%)<0)
(w%=1)
dialogue(5)
F%=0
F%=
seqfname(w%))
F%<>0
#F% :
error :
#F%,"|"
#F%,"| This file was automatically generated by "+Appl$+" v"+Version$
#F%,"| Do not edit with another program; changes may make it unreadable"
#F%,"|"
I%=0
nrapps%(w%)
z"
appltype%(w%,I%)=&2000
{!
applaction%(w%,I%)
}8
fileexists(applname$(w%,I%)+".!Boot")
~6
#F%,"Run "+applname$(w%,I%)+".!Boot";
A
#F%,"IconSprites "+applname$(w%,I%)+".!Sprites";
D
#F%,action$(applaction%(w%,I%))+" "+applname$(w%,I%);
@
#F%,action$(applaction%(w%,I%))+" "+applname$(w%,I%);
$
#F%," "+$(applargs%(w%,I%))
w%=0
,
#F%,"%Desktop -File "+
seqfname(1);
"OS_File",18,
seqfname(w%),&FEB
setchanged(w%,
setchanged(w%,newval%)
changed%(w%)
newval%
t$=$(wintitle%(w%))
changed%(w%)
% $(wintitle%(w%))=
(t$)-2)
$(wintitle%(w%))=t$+" *"
! changed%(w%)=
changed%(w%)
blk%!0=winhdl%(w%)
"Wimp_GetWindowState",,blk%
(blk%!32
(1<<16))
H
"Wimp_ForceRedraw",-1,blk%!4,(blk%!16)+4,blk%!12,(blk%!16)+36
setextent(w%,lastline%)
lastline%<2
lastline%=2
scrapblk%!0=0
-scrapblk%!4=icon0ymin%-80*(lastline%+2)-8
scrapblk%!8=icon0xmax%
scrapblk%!12=0
"Wimp_SetExtent",winhdl%(w%),scrapblk%
scrapblk%!0=winhdl%(w%)
"Wimp_GetWindowState",,scrapblk%
(scrapblk%!32
(1<<16))
"Wimp_OpenWindow",,scrapblk%
sprexists(sp$)
flags%
"XWimp_SpriteOp",&18,,sp$
;flags%
=((flags%
1)=0)
startdrag(w%,linenr%)
blk%!0=winhdl%(w%)
"Wimp_GetWindowState",,blk%
dragblk%!4=5
dragblk%!8=(blk%!4)+4
Adragblk%!12=(blk%!16)+icon0ymin%-((linenr%+1)*80)-(blk%!24)-4
7dragblk%!16=(dragblk%!8)+(icon1xmax%-icon0xmin%-16)
dragblk%!20=(dragblk%!12)+88
dragblk%!24=0
dragblk%!28=0
dragblk%!32=xpixels%
dragblk%!36=ypixels%
"Wimp_DragBox",,dragblk%
dragfromwin%=w%
dragfromline%=linenr%
str(s%)
i%,n$
s%?i% >= 32 : n$+=
(s%?i%) : i%+=1 :
trimleft(s$)
s$,p%,1)=" "
p%+=1
s$,p%)
trimright(s$)
s$,p%,1)=" ")
p%-=1
s$,1,p%)
upcase(s$)
i%=1
a%=
s$,i%,1))
(a%>=97)
(a%<=122)
s$,i%,1)=
(a%-32)
updateicon(window%,icon%)
scrapblk%!0=window%
scrapblk%!4=icon%
scrapblk%!8=0
scrapblk%!12=0
"Wimp_SetIconState",,scrapblk%
updateline(w%,linenr%)
leafn$,spr$
+leafn$=
leafname(applname$(w%,linenr%))
'$(appltext%(w%,linenr%))=" "+leafn$
spr$=""
leafn$<>""
appltype%(w%,linenr%)
"
&1000 : spr$="directory"
&2000
sprexists(leafn$)
spr$=leafn$
spr$="application"
&FFFFFFFF
spr$="file_xxx"
0 spr$="file_"+
~(appltype%(w%,linenr%))
sprexists(spr$)
spr$="file_xxx"
'$(applsprite%(w%,linenr%))="S"+spr$
updateicon(winhdl%(w%),2*linenr%+2)
leafn$=""
& $(applactiontxt%(w%,linenr%))=""
D $(applactiontxt%(w%,linenr%))=action$(applaction%(w%,linenr%))
updateicon(winhdl%(w%),2*linenr%+3)
objtype(name$)
type%,loadaddr%
"OS_File",17,name$
type%,,loadaddr%
type%
(
((loadaddr%>>20)
&FFF)=&FFF
% type%=(loadaddr%>>8)
&FFF
type%=-1
$
leafname(file$),1)="!"
type%=&2000
type%=&1000
=type%
validaction(action%,window%,type%)
valid%
type%
&FF9
valid%=(action%=2)
(7
osversion%>=300
valid%=valid%
(action%=4)
&1000
valid%=(action%=3)
&2000
action%
0,1,3 : valid%=
.:
5 : valid%=(osversion%>=300)
(window%=1)
: valid%=
0
valid%=(action%=0)
=valid%
seticonstate(window%,icon%,eor%,clr%)
scrapblk%!0=window%
scrapblk%!4=icon%
scrapblk%!8=eor%
scrapblk%!12=clr%
"Wimp_SetIconState",,scrapblk%
selecticon(window%,icon%,f%)
scrapblk%!0=window%
scrapblk%!4=icon%
scrapblk%!8=1<<21
scrapblk%!8=0
scrapblk%!12=1<<21
"Wimp_SetIconState",,scrapblk%
menuselect(selection%)
adjust%,selinfo%,itemnr%,item%,item$,parentitem%,seq%
"MenuUtil_Decode",lastmenu%,selection%
,adjust%,selinfo%
itemnr%=selinfo%!0
item%=selinfo%!8
item$=
str(selinfo%!12)
parentitem%=selinfo%!24
seq%=lastmenu_seq%
item%
item_reread%
clearsequence(0)
clearsequence(1)
loadall
item_saveall%
saveall
item_quit%
Z%
changed%(0)
changed%(1)
dialogue(6)
\
quit%=
^
item_openparent%
`C
"Filer_OpenDir "+
dirname(applname$(seq%,lastmenu_line%))
item_delete%
b(
deleteappl(seq%,lastmenu_line%)
lastmenu_line%=-1
item_args%
e/ $(applargs%(seq%,lastmenu_line%))=item$
setchanged(seq%,
item_toroot%
hQ applname$(seq%,lastmenu_line%)=
striproot(applname$(seq%,lastmenu_line%))
i(
updateline(seq%,lastmenu_line%)
item_saveseq%
savesequence(seq%)
adjust%
showmenu(0,lastmenu%,lastmenu_seq%,lastmenu_line%)
*** procs for creating menus ***
showmenu(blkptr%,menu%,seq%,linenr%)
item$
blkptr%<>0
blkptr%!4=blkptr%!4+22
lastmenu%=menu%
lastmenu_seq%=seq%
lastmenu_line%=linenr%
menu%=seqmenu%
}( item$=
msg_lookup0("IT_ITEM")+" '"
linenr%>=0
1 item$+=
leafname(applname$(seq%,linenr%))
@
"MenuUtil_Text",item_args%,$(applargs%(seq%,linenr%))
H
"MenuUtil_Fade",item_toroot%,(appltype%(seq%,linenr%)<>&1000)
I
"MenuUtil_Tick",item_argsmenu%,
($(applargs%(seq%,linenr%)))>0
item$+="'"
"MenuUtil_Text",item_item%,item$
"MenuUtil_Fade",item_item%,linenr%<0
"MenuUtil_Show",lastmenu%,blkptr%
menu_add(text$,submenu%,genmsg%)
handle%
"MenuUtil_Add",,text$
handle%
submenu%<>-1
"MenuUtil_SubMenu",handle%,submenu%
genmsg%
"MenuUtil_Warning",handle%,1
=handle%
menu_addwritable(maxlen%,validstr%)
handle%
"MenuUtil_Add",,""
handle%
"MenuUtil_Writable",,1,maxlen%,validstr%
=handle%
initmenus
"MenuUtil_Initialise",010,0
"MenuUtil_New",,Appl$
mainmenu%
<item_info%=
menu_add(
msg_lookup0("IT_INFO"),infowin%,0)
8item_reread%=
menu_add(
msg_lookup0("IT_RERD"),-1,0)
>item_fnames%=
menu_add(
msg_lookup0("IT_FNMS"),filewin%,1)
9item_saveall%=
menu_add(
msg_lookup0("IT_SVAL"),-1,0)
"MenuUtil_Dots",0,1
6item_quit%=
menu_add(
msg_lookup0("IT_QUIT"),-1,0)
"MenuUtil_New",,
msg_lookup0("IT_ARGS")
argsmenu%
&item_args%=
menu_addwritable(64,0)
"MenuUtil_New",,
msg_lookup0("IT_ITEM")
itemsubmenu%
Aitem_argsmenu%=
menu_add(
msg_lookup0("IT_ARGS"),argsmenu%,0)
7item_delete%=
menu_add(
msg_lookup0("IT_DEL"),-1,0)
<item_openparent%=
menu_add(
msg_lookup0("IT_OPAR"),-1,0)
8item_toroot%=
menu_add(
msg_lookup0("IT_ROOT"),-1,0)
"MenuUtil_New",,
msg_lookup0("IT_SEQ")
seqmenu%
+item_item%=
menu_add("",itemsubmenu%,0)
9item_saveseq%=
menu_add(
msg_lookup0("IT_SVSQ"),-1,0)
lastmenu%=0
*** procs for handling messages in the Messages file ***
msg_init
fname$,flags%,size%,buf%
fname$=ApplPath$+"Messages"
"MessageTrans_FileInfo",,fname$
flags%,,size%
flags%
buf%=0
buf% size%
MsgDesc% 17+
(fname$)
$(MsgDesc%+16)=fname$
"MessageTrans_OpenFile",MsgDesc%,MsgDesc%+16,buf%
msg_exit
"MessageTrans_CloseFile",MsgDesc%
MsgDesc%=0
msg_lookup0(token$)
result%
"MessageTrans_Lookup",MsgDesc%,token$,0
,,result%
str(result%)
msg_lookup1(token$,param$)
result%
"MessageTrans_Lookup",MsgDesc%,token$,scrapblk%,&100,param$
,,result%
str(result%)
msg_lookup2(token$,param1$,param2$)
result%
"MessageTrans_Lookup",MsgDesc%,token$,scrapblk%,&100,param1$,param2$
,,result%
str(result%)
dialogue(no%)
mask%,cancelbutton%
mask%=(1<<2)+(&FF<<24)
cancelbutton%=
no%
' $dial_msg%=
msg_lookup0("NRMI")
4 $dial_msg%=
msg_lookup1("CFBS",
seqfname(0))
4 $dial_msg%=
msg_lookup1("CFBS",
seqfname(1))
- $dial_msg%=
msg_lookup1("NTAG",Appl$)
0 $dial_msg%=
msg_lookup1("CFBD",bootdir$)
' $dial_msg%=
msg_lookup0("SEQ0")
' $dial_msg%=
msg_lookup0("QNYW")
cancelbutton%=
cancelbutton%
seticonstate(dialogwin%,1,dial_buttoncol%,mask%)
seticonstate(dialogwin%,2,&11<<24,mask%) :
make button invisible
seticonstate(dialogwin%,3,dial_buttoncol%,mask%)
seticonstate(dialogwin%,1,&11<<24,mask%)
seticonstate(dialogwin%,2,dial_buttoncol%,mask%)
seticonstate(dialogwin%,3,&11<<24,mask%)
scrapblk%!0=dialogwin%
"Wimp_GetWindowState",,scrapblk%
"Wimp_CreateMenu",,dialogwin%,scrapblk%!4,scrapblk%!16
lastdialogue%=no%